package ReSofting.it.GoldDirector.Model;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.UUID;

import ReSofting.it.GoldDirector.Adapters.ItemOrdineAdapter;
import ReSofting.it.GoldDirector.Adapters.MenuAdapter;
import android.util.Log;


public class GlobalDatas {
	
	//Menu
	public static ArrayList<myMenu> MenuList = new ArrayList<myMenu>() ;
	
	//Categorie
	public static ArrayList<myCategoria> CategorieList = new ArrayList<myCategoria>() ;
	
	//Aggiunte
	public static ArrayList<myAggiunta> AggiunteList = new ArrayList<myAggiunta>() ;
	
	
	//Ordine corrente
	public static myOrdine CurrentOrder  = null ;
	
	public static  ItemOrdineAdapter OrderAdapter = null;
	
	//Net Settings
	public static myNetSettings NetSettings = null;
	
	
	public static myMenu findInMenu_byID (UUID pGuid)
	{
		if(MenuList == null) return null;
		
		 for (int i = 0; i < MenuList.size(); ++i) 
	        {	        					
	        	if (  MenuList.get(i).GuidIDMn == pGuid )  
	        		return MenuList.get(i);			
	        }   
		 
		 return null;
		
	}//fM
	
	
	public static ArrayList<myMenu> getMenuItens_byCatID (String pCat)
	{
		if(MenuList == null) return null;
		
		Log.d("Diego : trova cat items con catID : " , ""+ pCat  );
		ArrayList<myMenu> ret = new ArrayList<myMenu>();
		
		for (int i = 0; i < MenuList.size(); ++i) 
	        {	        					 
	        	if (  MenuList.get(i).FkCategoria.equals( pCat) )  
	        		ret.add( MenuList.get(i) );	
	        }   		 
		 
		 Log.d("Diego trova cat items "+ pCat ,"return");
		 return ret ;
		
	}//fM
	

}
